# Copyright 2018- The Pixie Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

load("@protocol_inference//:requirements.bzl", "requirement")
load("@rules_python//python:defs.bzl", "py_binary", "py_library")

lib_srcs = glob([
    "data/*.py",
    "model/*.py",
    "utils/*.py",
])

lib_srcs.append("__init__.py")

py_library(
    name = "protocol_inference_lib",
    srcs = lib_srcs,
    deps = [
        requirement("pandas"),
        requirement("prettytable"),
        requirement("termcolor"),
        requirement("torch"),
    ],
)

py_binary(
    name = "data_collection",
    srcs = ["data_collection.py"],
    deps = [
        ":protocol_inference_lib",
    ],
)

py_binary(
    name = "dataset_generation",
    srcs = ["dataset_generation.py"],
    deps = [
        ":protocol_inference_lib",
    ],
)

py_binary(
    name = "eval",
    srcs = ["eval.py"],
    deps = [
        ":protocol_inference_lib",
    ],
)
